<!doctype html>



  


<html class="theme-next pisces use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>






<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.0" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Android,Linux,Ubuntu," />








  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.0" />






<meta name="description" content="最近开发工具要从Mac切换到Ubuntu，开始学习Chromium内核相关知识，本文主要纪录Ubuntu（12.04LTS）安装完成之后，安装常用软件的过程，将 Android 开发环境搭建成功。  zsh 与oh－my－zshMac 上一直使用，为保持一致的体验，首先选择安装zsh。zsh与oh-my-zsh安装方法参考 安装完成之后记得重启电脑。">
<meta name="keywords" content="Android,Linux,Ubuntu">
<meta property="og:type" content="article">
<meta property="og:title" content="Ubuntu 开发环境搭建以及常用软件安装">
<meta property="og:url" content="http://imesong.com/2016/04/08/2016/Ubuntu-开发环境搭建以及常用软件安装/index.html">
<meta property="og:site_name" content="imesong">
<meta property="og:description" content="最近开发工具要从Mac切换到Ubuntu，开始学习Chromium内核相关知识，本文主要纪录Ubuntu（12.04LTS）安装完成之后，安装常用软件的过程，将 Android 开发环境搭建成功。  zsh 与oh－my－zshMac 上一直使用，为保持一致的体验，首先选择安装zsh。zsh与oh-my-zsh安装方法参考 安装完成之后记得重启电脑。">
<meta property="og:updated_time" content="2017-04-19T04:36:26.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Ubuntu 开发环境搭建以及常用软件安装">
<meta name="twitter:description" content="最近开发工具要从Mac切换到Ubuntu，开始学习Chromium内核相关知识，本文主要纪录Ubuntu（12.04LTS）安装完成之后，安装常用软件的过程，将 Android 开发环境搭建成功。  zsh 与oh－my－zshMac 上一直使用，为保持一致的体验，首先选择安装zsh。zsh与oh-my-zsh安装方法参考 安装完成之后记得重启电脑。">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Pisces',
    sidebar: {"position":"left","display":"post","offset":12,"offset_float":0,"b2t":false,"scrollpercent":false},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://imesong.com/2016/04/08/2016/Ubuntu-开发环境搭建以及常用软件安装/"/>





  <title> Ubuntu 开发环境搭建以及常用软件安装 | imesong </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  





  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?cb36183ed65a7652b909d352ab2166";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>










  
  
    
  

  <div class="container sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">imesong</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">我们的征途是星辰大海</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="http://imesong.com/2016/04/08/2016/Ubuntu-开发环境搭建以及常用软件安装/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="imesong">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="https://s.gravatar.com/avatar/bd2525e0ecc6d8022339c7dce27065c0?s=160">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="imesong">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                Ubuntu 开发环境搭建以及常用软件安装
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2016-04-08T22:26:22+08:00">
                2016-04-08
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Ubuntu/" itemprop="url" rel="index">
                    <span itemprop="name">Ubuntu</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    


    <div class="post-body han-init-context" itemprop="articleBody">

      
      

      
        <blockquote>
<p>最近开发工具要从Mac切换到Ubuntu，开始学习Chromium内核相关知识，本文主要纪录Ubuntu（12.04LTS）安装完成之后，安装常用软件的过程，将 Android 开发环境搭建成功。</p>
</blockquote>
<h3 id="zsh-与oh－my－zsh"><a href="#zsh-与oh－my－zsh" class="headerlink" title="zsh 与oh－my－zsh"></a>zsh 与oh－my－zsh</h3><p>Mac 上一直使用，为保持一致的体验，首先选择安装<strong>zsh</strong>。<a href="http://www.jianshu.com/p/546effd99c35" target="_blank" rel="external">zsh与oh-my-zsh安装方法参考</a></p>
<p>安装完成之后记得重启电脑。</p>
<a id="more"></a>
<h3 id="JDK"><a href="#JDK" class="headerlink" title="JDK"></a>JDK</h3><p>Android 开发，怎么能没有JDK。<a href="http://www.cnblogs.com/a2211009/p/4265225.html" target="_blank" rel="external">JDK 安装方法参考</a></p>
<p>这里有个小坑，使用 apt-get 安装 jdk 之后，编译 chromium 内核时，提示无法找到 java相关的命令，但是在终端里自行 java,javac 等这些命令，都是正常的。后来通过手动安装jdk，在 .zshrc 中配置下环境变量，再编译就OK了。通过apt－get 安装配置下环境变量理论上也是可以的，不过没有实验。</p>
<h3 id="Android-Studio"><a href="#Android-Studio" class="headerlink" title="Android Studio"></a>Android Studio</h3><p>在 Ubuntu 下，Android Studio 安装也是傻瓜式的，解压之后，找到 studio.sh ,确保有执行权限，执行打开即可。打开之后，会提示下载SDK，各种支持库等等。<br>Android Studio 安装之后，有一些常用的插件<br><strong>.gitignore</strong><br><strong>adb idea</strong><br><strong>genymotion</strong><br><strong>butterknife zelezny</strong></p>
<p>最常用的其实也没几个。</p>
<h3 id="VirturalBox-amp-Genymotion"><a href="#VirturalBox-amp-Genymotion" class="headerlink" title="VirturalBox &amp; Genymotion"></a>VirturalBox &amp; Genymotion</h3><p>Android开发必备利器之一。这两个软件都可以从官方网站直接下载安装。<br><strong><a href="https://www.virtualbox.org/wiki/Linux_Downloads" target="_blank" rel="external">VirtualBox官网下载</a></strong><br><strong><a href="https://www.genymotion.com/download/" target="_blank" rel="external">Genymotion 官网下载安装</a>,或者参考<a href="https://www.virtualbox.org/wiki/Linux_Downloads" target="_blank" rel="external">Ubuntu 下 Genymotion安装</a></strong><br>记得要先安装 VirtualBox ,再安装Genymotion。</p>
<p>Genymotion 网站实在太卡，提供一个自己放在七牛上的一个下载文件<a href="http://7xsnut.com2.z0.glb.clouddn.com/resource/2016/genymotion-2.6.0-linux_x64.bin" target="_blank" rel="external">Genymotion国内镜像下载</a> 注意 <strong>Checksum Ubuntu 14.10 (64 bits) == f103e331142340dddeb1f2e2fcd92309cf95938a</strong></p>
<h3 id="Chrome"><a href="#Chrome" class="headerlink" title="Chrome"></a>Chrome</h3><p><strong><a href="http://jingyan.baidu.com/article/a681b0de18071e3b1843463b.html" target="_blank" rel="external">Chrome 安装参考</a></strong></p>
<h3 id="ShadowSocks"><a href="#ShadowSocks" class="headerlink" title="ShadowSocks"></a>ShadowSocks</h3><p>Mac 上一直使用付费的ShadowSocks ,Ubuntu上需要安装客户端，配置下才能使用。同时做到开机自启，关闭终端仍然可以正常使用。</p>
<p><strong>安装 pip</strong><br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">apt-get install python-pip</div></pre></td></tr></table></figure></p>
<p><strong>安装 shadowsocks</strong></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">pip install shadowsocks</div></pre></td></tr></table></figure>
<p>安装成功之后，可以执行下命令<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sslocal</div></pre></td></tr></table></figure></p>
<p><strong>创建shadowsocks.json</strong><br>在 /etc 目录下创建 shadowsocks.json 文件<br>内容如下</p>
<blockquote>
<p>{“server”:”你的服务器ip”, “server_port”:你的服务端配置的端口号, “local_port”:1080, “password”:”配置的密码”, “timeout”:600, “method”:”rc4-md5”}</p>
</blockquote>
<p>执行命令，后台启动 ShadowSocks </p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">nohup sslocal -c /etc/shadowsocks.json &amp;</div></pre></td></tr></table></figure>
<p>但是这样，每次开机都要执行下这个命令还是很不爽啊。下面添加开机自启动<br>创建 <strong>shadowsocksAutoStartup.sh</strong>内容如下</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">#!/bin/bash</div><div class="line">/usr/local/bin/sslocal -c /etc/shadowsocks.json &amp;</div></pre></td></tr></table></figure>
<p>确保 shadowsocksAutoStartup.sh 有执行权限。</p>
<p>添加到开机启动文件中，修改  /etc/rc.local 在文件最后添加如下代码</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">nohup bash /home/your_usr/shadowsocksAutoStartup.sh &amp;</div></pre></td></tr></table></figure>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/Android/" rel="tag"># Android</a>
          
            <a href="/tags/Linux/" rel="tag"># Linux</a>
          
            <a href="/tags/Ubuntu/" rel="tag"># Ubuntu</a>
          
        </div>
      

      
        
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2016/04/19/2016LearningList/" rel="next" title="2016LearningList">
                <i class="fa fa-chevron-left"></i> 2016LearningList
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2016/04/07/2016/Android-Smali-语法学习/" rel="prev" title="Android Smali 语法学习">
                Android Smali 语法学习 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="https://s.gravatar.com/avatar/bd2525e0ecc6d8022339c7dce27065c0?s=160"
               alt="imesong" />
          <p class="site-author-name" itemprop="name">imesong</p>
           
              <p class="site-description motion-element" itemprop="description"></p>
          
        </div>
        <nav class="site-state motion-element">

          
            <div class="site-state-item site-state-posts">
              <a href="/archives">
                <span class="site-state-item-count">10</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          
            
            
            <div class="site-state-item site-state-categories">
              <a href="/categories/index.html">
                <span class="site-state-item-count">5</span>
                <span class="site-state-item-name">分类</span>
              </a>
            </div>
          

          
            
            
            <div class="site-state-item site-state-tags">
              <a href="/tags/index.html">
                <span class="site-state-item-count">20</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/imesong" target="_blank" title="GitHub">
                  
                    <i class="fa fa-fw fa-github"></i>
                  
                  GitHub
                </a>
              </span>
            
          
        </div>

        
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#zsh-与oh－my－zsh"><span class="nav-number">1.</span> <span class="nav-text">zsh 与oh－my－zsh</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#JDK"><span class="nav-number">2.</span> <span class="nav-text">JDK</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Android-Studio"><span class="nav-number">3.</span> <span class="nav-text">Android Studio</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#VirturalBox-amp-Genymotion"><span class="nav-number">4.</span> <span class="nav-text">VirturalBox & Genymotion</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Chrome"><span class="nav-number">5.</span> <span class="nav-text">Chrome</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#ShadowSocks"><span class="nav-number">6.</span> <span class="nav-text">ShadowSocks</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2019</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">imesong</span>
</div>


<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Pisces
  </a>
</div>


        

        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.0"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.0"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.0"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.0"></script>



  


  




	





  





  





  






  





  

  

  

  

  

</body>
</html>
